package com.msb.dp.strategy;

/**
 * @Auther: Huanyu Lee
 * @Date: 2022/3/3  17:19
 * @Description: 猫的体重比较器
 */
public class CatWeightComparator implements Comparator<Cat>{
    @Override
    public int compare(Cat o1, Cat o2) {
        if (o1.weight < o2.weight)  return -1;
        else if (o1.weight > o2.weight)  return 1;
        return 0;
    }
}
